namespace Codeplus.Dhruvtaata.Web.Migrations {
    using System;
    using System.Data.Entity.Migrations;

    public partial class CreateSubjectCategory : DbMigration {
        public override void Up() {
            this.CreateTable("dbo.Subjects", t => new {
                SubjectId = t.Int(nullable: false, identity: false),
                Name = t.String(),
                ParentSubjectId = t.Int(nullable: true, identity: false)
            })
            .PrimaryKey(k => k.SubjectId)
            .Index(k => k.SubjectId)
            .ForeignKey("Subjects", k => k.ParentSubjectId, cascadeDelete: false, name: "Subjects_SubjectId_ParentSubjectId");
        }

        public override void Down() {
            this.DropTable("dbo.Subjects");
        }
    }
}
